<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @keyframes mymove {
            from {
                left: 0px;
            }

            to {
                left: 70px;
            }
        }

        .father {
            background: #748096;
            border-radius: 5px;
            position: relative;
            top: 70px;
            left: -5px;
        }

        .moveson {
            width: 20px;
            height: 8px;
            background: #a0e80c;
            border-radius: 5px;
            animation: mymove 2s linear infinite;
            position: relative;
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="moveson"></div>
    </div>

</body>

</html>